package cg

import (
	"unsafe"
)

import "C"

func Scharp(s string) *C.char {
	pt, _ := Scharp2(s)
	return pt
}
func Scharp2(s string) (*C.char, C.int) {
	pt, lt, _ := Scharp3(s)
	return pt, lt
}
func Scharp3(s string) (*C.char, C.int, []byte) {
	bt := []byte(s)
	lt := len(bt)
	pt := (*C.char)(unsafe.Pointer(&bt[0]))
	return pt, C.int(lt), bt
}
